package top.jingles.sayhiintime;

public class Setting {
    private static Setting myInstance = new Setting();
    private static final String[] sayWords = {
            "凌晨12点，新的一天，新的开始~好好休息，好好生活~",
            "如果你看到这条消息，说明你要挨揍！赶紧睡觉！",
            "看到的话请回复……",
            "起来尿个尿吧~",
            "四点了~",
            "早上5点，还挺早的，再小睡一会~",
            "早上6点，要早起锻炼身体吗？那就赶快清醒清醒吧~",
            "早上7点，差不多该起来了哟~",
            "上午8点，出门了没？再不赶紧去上班就该晚了呀~",
            "上午9点，开工了没有？要好好工作！",
            "上午10点，思路要清晰，工作要努力~",
            "上午11点，加把劲啊，上午可快要过去了~~",
            "中午12点，吃饭咯~ :)",
            "下午1点，上班啦~ :(",
            "下午2点，困不？出去洗把脸清醒一下~",
            "下午3点，累了就歇会~",
            "下午4点，加油加油！",
            "下午5点，工作快要结束了，清点一下今天自己的成就和心得吧~",
            "晚上6点，完美的一天结束了，下班回家~",
            "晚上7点，晚饭要好好吃啊，别将就~还有，吃完记得刷碗 *^v^*",
            "晚上8点，在外面稍微运动一下吧，整天呆着会变傻的~",
            "晚上9点，整理下心情，学习点自己感兴趣的事情吧~",
            "晚上10点，收拾一下家里，打扫打扫卫生，洗个澡，发会呆，然后就该睡了哟~",
            "晚上11点，赶紧睡吧，别玩了~小心明天上班被老板骂呀~"
    };
    private String bgpicPath = "/.dev/SayHiInTime/background";
    private String soundPath = "/.dev/SayHiInTime/sound/";
    private String ttsPath = "/.dev/SayHiInTime/tts/Resource.irf";
    private String voiceStyle = "燕姿语音";
    private String voiceStyleName = "stefanie";

    public static Setting getInstance() {
        return myInstance;
    }

    public static String getSaywords(int paramInt) {
        if (paramInt <= 23) {
            return sayWords[paramInt];
        }
        return "";
    }

    public static String getWords(int hour) {
        String styleStr = myInstance.getVoiceStyle();
        if (styleStr.equals("燕姿语音") || styleStr.equals("标准语音") || styleStr.equals("甜美语音") || styleStr.equals("情人节语音")) {
//            return sayWords[hour];
            return null;
        } else {
            return getWordsByHour(hour);
        }
    }

    public static String getWordsByHour(int hour) {
        String str = "";
        if (hour <= 8) {
            str = "现在是" + "早上";
        } else if (hour < 12) {
            str = "现在是" + "上午";
        } else if (hour == 12) {
            str = "现在是" + "中午";
        } else if (hour <= 18) {
            str = "现在是" + "下午";
        } else {
            str = "现在是" + "晚上";
        }
        if (hour <= 12) {
            str += String.valueOf(hour);
        } else {
            str += String.valueOf(hour - 12);
        }
        return str + "点整";
    }

    public String getBgpicPath() {
        return this.bgpicPath;
    }

    public String getSoundPath() {
        return this.soundPath;
    }

    public String getTtsPath() {
        return this.ttsPath;
    }

    public String getVoiceStyle() {
        if (this.voiceStyle == null) {
            this.voiceStyle = "燕姿语音";
        }
        return this.voiceStyle;
    }

    public String getVoiceStyleName() {
        return this.voiceStyleName;
    }

    public void setBgpicPath(String picPath) {
        this.bgpicPath = picPath;
    }

    public void setSoundPath(String soundPath) {
        this.soundPath = soundPath;
    }

    public void setTtsPath(String ttsPath) {
        this.ttsPath = ttsPath;
    }

    public void setVoiceStyle(String styleStr) {
        this.voiceStyle = styleStr;
        if (styleStr.equals("燕姿语音")) {
            styleStr = "stefanie";
        } else if (styleStr.equals("标准语音")) {
            styleStr = "standard";
        } else if (styleStr.equals("甜美语音")) {
            styleStr = "sweet";
        } else if (styleStr.equals("情人节语音")) {
            styleStr = "valentine";
        } else {
            styleStr = "tts";
        }
        this.voiceStyleName = styleStr;
    }

    public void setVoiceStyleName(String styleStr) {
        this.voiceStyleName = styleStr;
    }
}
